{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=312
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	a,b,t,i,n:longint;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n);
a:=1;
b:=1;
for i:=2 to n do begin
	t:=a+b;
	a:=b;
	b:=t;
end;
write(b);
end.